home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DJINC106.ARJ / TIME.H < prev    next >
C/C++ Source or Header  |  1992-03-09  |  3KB  |  78 lines

  1. /*
  2.  * Copyright (c) 1989 The Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms are permitted provided
  6.  * that: (1) source distributions retain this entire copyright notice and
  7.  * comment, and (2) distributions including binaries display the following
  8.  * acknowledgement:  ``This product includes software developed by the
  9.  * University of California, Berkeley and its contributors'' in the
  10.  * documentation or other materials provided with the distribution and in
  11.  * all advertising materials mentioning features or use of this software.
  12.  * Neither the name of the University nor the names of its contributors may
  13.  * be used to endorse or promote products derived from this software without
  14.  * specific prior written permission.
  15.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  16.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  17.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  18.  *
  19.  *      @(#)time.h      5.6 (Berkeley) 6/23/90
  20.  */
  21.  
  22. #ifndef _TIME_H_
  23. #define _TIME_H_
  24.  
  25. #include <sys/types.h>
  26.  
  27. #ifndef NULL
  28. #define NULL    0
  29. #endif
  30.  
  31. #ifdef  _CLOCK_T_
  32. typedef _CLOCK_T_       clock_t;
  33. #undef  _CLOCK_T_
  34. #endif
  35.  
  36. #ifdef  _TIME_T_
  37. typedef _TIME_T_        time_t;
  38. #undef  _TIME_T_
  39. #endif
  40.  
  41. #ifdef  _SIZE_T_
  42. typedef _SIZE_T_        size_t;
  43. #undef  _SIZE_T_
  44. #endif
  45.  
  46. struct tm {
  47.         int     tm_sec;         /* seconds after the minute [0-60] */
  48.         int     tm_min;         /* minutes after the hour [0-59] */
  49.         int     tm_hour;        /* hours since midnight [0-23] */
  50.         int     tm_mday;        /* day of the month [1-31] */
  51.         int     tm_mon;         /* months since January [0-11] */
  52.         int     tm_year;        /* years since 1900 */
  53.         int     tm_wday;        /* days since Sunday [0-6] */
  54.         int     tm_yday;        /* days since January 1 [0-365] */
  55.         int     tm_isdst;       /* Daylight Savings Time flag */
  56.         long    tm_gmtoff;      /* offset from CUT in seconds */
  57.         char    *tm_zone;       /* timezone abbreviation */
  58. };
  59.  
  60. #ifdef __cplusplus
  61. extern "C" {
  62. #endif
  63. extern struct tm *gmtime(const time_t *);
  64. extern struct tm *localtime(const time_t *);
  65. extern time_t mktime(const struct tm *);
  66. extern unsigned long time(unsigned long *);
  67. extern double difftime(const time_t, const time_t);
  68. extern char *asctime(const struct tm *);
  69. extern char *ctime(const time_t *);
  70. extern char *timezone(int , int);
  71. extern void tzset(void);
  72. extern void tzsetwall(void);
  73. #ifdef __cplusplus
  74. }
  75. #endif
  76.  
  77. #endif
  78.